home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 163_01 / index.c < prev    next >
Encoding:
Text File  |  1988-01-30  |  384 b   |  8 lines

  1. /*
  2. ** return pointer to the first occurrence of c in s
  3. */
  4. index(s, c) char *s, c; {
  5.   while(*s) if(*s++ == c) return --s;
  6.   return 0;
  7.   }
  8.